import request from '@/utils/request'

export function listProduction(query) {
  return request({
    url: '/production/list',
    method: 'get',
    params: query
  })
}

export function enableProductionById(productionId) {
  return request({
    url: '/production/enable/' + productionId,
    method: 'post'
  })
}

export function disableProductionById(productionId) {
  return request({
    url: '/production/disable/' + productionId,
    method: 'post'
  })
}


export function findProduct(data) {
  return request({
    url: '/product/findAll',
    method: 'get',
    params: data
  })
}
//新增产品
export function addProduct(data) {
  return request({
    url: '/product/addProduct',
    method: 'post',
    data
  })
}

export function addLoanInfo(data) {
  return request({
    url: '/loanInfo/addLoanInfo',
    method: 'post',
    data
  })
}

export function findOne(productId) {
  return request({
    url: '/product/findOne/' + productId,
    method: 'get'
  })
}